package org.JQbitorrentClinet.interfaces;

import org.JQbitorrentClinet.pojo.application.ApplicationPreferences;
import org.JQbitorrentClinet.pojo.rss.RssAutoDownloadingRule;
import org.JQbitorrentClinet.pojo.search.*;
import org.JQbitorrentClinet.pojo.torrent.*;
import org.JQbitorrentClinet.request.log.GetLogParam;
import org.JQbitorrentClinet.request.application.SetApplicationPreferencesParam;
import org.JQbitorrentClinet.request.log.GetPeerLogParam;
import org.JQbitorrentClinet.request.rss.*;
import org.JQbitorrentClinet.request.search.*;
import org.JQbitorrentClinet.request.sync.GetMainDataParam;
import org.JQbitorrentClinet.request.sync.GetTorrentPeersDataParam;
import org.JQbitorrentClinet.request.torrentmanagement.*;
import org.JQbitorrentClinet.request.transferinfo.*;
import org.JQbitorrentClinet.pojo.application.BuildInfo;
import org.JQbitorrentClinet.pojo.log.LogRecord;
import org.JQbitorrentClinet.pojo.sync.SyncMainData;
import org.JQbitorrentClinet.pojo.transfer.GlobalTransferInfo;

import java.util.List;
import java.util.Map;

public interface QBitorrentClient {
    boolean login();
    boolean logout();
    String getApiVersion();

    String getApplicationVersion();

    BuildInfo getBuildInfo();

    void shutdown();

    ApplicationPreferences getApplicationPreferences();

    boolean setApplicationPreferences(SetApplicationPreferencesParam param);

    String getDefaultSavePath();

    List<LogRecord> getLog(GetLogParam param);

    List<LogRecord> getPeerLog(GetPeerLogParam param);

    SyncMainData getMainData(GetMainDataParam param);

    String getTorrentPeersData(GetTorrentPeersDataParam param);

    GlobalTransferInfo getGlobalTransferInfo(GetGlobalTransferInfoParam param);

    String getAlternativeSpeedLimitsState(GetAlternativeSpeedLimitsStateParam param);

    void toggleAlternativeSpeedLimits(ToggleAlternativeSpeedLimitsParam param);

    Integer getGlobalDownloadLimit(GetGlobalDownloadLimitParam param);

    void setGlobalDownloadLimit(SetGlobalDownLimitParam param);

    Integer getGlobalUploadLimit(GetGlobalUploadLimit param);

    void setGlobalUploadLimit(SetGlobalUploadLimitParam param);

    void banPeers(BanPeersParam param);

    List<TorrentInfo>  getTorrentList(GetTorrentListParam param);

    TorrentGenericProperties getTorrentGenericProperties(GetTorrentGenericPropertiesParam param);

    List<TrackerInfo> getTorrentTrackers(GetTorrentTrackersParam param);

    List<String> getTorrentWebSeeds(GetTorrentWebSeedsParam param);

    List<TorrentContent> getTorrentContents(GetTorrentContentsParam param);

    List<Integer> getTorrentPiecesStates(GetTorrentPiecesStatesParam param);

    List<String> getTorrentPiecesHashes(GetTorrentPiecesHashesParam param);

    void pauseTorrents(PauseTorrentsParam param);

    void resumeTorrents(ResumeTorrentsParam resumeParam);

    void deleteTorrents(DeleteTorrentsParam param);

    void recheckTorrents(RecheckTorrentsParam param);

    void reannounceTorrents(ReannounceTorrentsParam param);

    void addNewTorrent(AddNewTorrentParam param);

    void addTrackersToTorrent(AddTrackersToTorrentParam param);

    void editTrackers(EditTrackersParams param);

    void removeTrackers(RemoveTrackersParam param);

    void addPeers(AddPeersParam param);

    void increaseTorrentPriority(IncreaseTorrentPriorityParam param);

    void decreaseTorrentPriority(DecreaseTorrentPriorityParam param);

    void maximalTorrentPriority(MaximalTorrentPriorityParam param);

    void minimalTorrentPriority(MinimalTorrentPriorityParam param);

    void setFilePriority(SetFilePriorityParam param);

    Map<String,Integer> getTorrentDownloadLimit(GetTorrentDownloadLimitParam param);

    void setTorrentDownloadLimit(SetTorrentDownloadLimitParam param);

    void setTorrentShareLimit(SetTorrentShareLimitParam param);

    Map<String, Integer> getTorrentUploadLimit(GetTorrentUploadLimitParam param);

    void setTorrentUploadLimit(SetTorrentUploadLimitParam param);

    void setTorrentLocation(SetTorrentLocationParam param);

    void setTorrentName(SetTorrentNameParam param);

    void addNewCategory(AddNewCategoryParam param);

    Map<String, Category> getAllCategories(GetAllCategoriesParam param);

    void setTorrentCategory(SetTorrentCategoryParam param);

    void editCategory(EditCategoryParam param);

    void removeCategory(RemoveCategoryParam param);

    void addTorrentTags(AddTagsParam param);

    void removeTags(RemoveTorrentTags param);

    List<String> getAllTags(GetAllTagsParam param);

    void createTags(CreateTagsParam param);

    void deleteTags(RemoveTagsParam param);

    void setAutomaticTorrentManagement(SetAutomaticTorrentManagementParam param);

    void toggleSequentialDownload(ToggleSequentialDownloadParam param);

    void setFirstLastPiecePriority(SetFirstLastPiecePriorityParam param);

    void setForceStart(SetForceStartParam param);

    void setSuperSeeding(SetSuperSeedingParam param);

    void renameFile(RenameFileParam param);

    void renameFolder(RenameFolderParam param);

    void rssAddFolder(RssAddFolderParam param);

    void rssAddFeed(RssAddFeedParam param);

    void rssRemoveItem(RssRemoveItemParam param);

    void rssMoveItem(RssMoveItemParam param);

    List<String> rssGetAllItems(RssGetAllItemsParam param);

    void rssMarkAsRead(RssMarkAsReadParam param);

    void rssRefreshItem(RssRefreshItemParam param);

    Map<String, RssAutoDownloadingRule> getAutoDownloadingRule(RssGetAutoDownloadingRuleParam param);

    void setAutoDownloadingRule(RssSetAutoDownloadingRuleParam param);

    void renameAutoDownloadingRule(RssRenameAutoDownloadingRuleParam param);

    void removeAutoDownloadingRule(RssRemoveAutoDownloadingRuleParam param);

    Map<String, List<String>> getAllArticlesMatchingARule(RssGetAllArticlesMatchingARuleParam param);

    SearchJob startSearch(StartSearchParam param);

    void stopSearch(StopSearchParam param);

    List<SearchJobStatus> getSearchStatus(SearchStatusParam param);

    SearchJobResult getSearchResults(GetSearchResultParam param);

    void deleteSearch(DeleteSearchParam param);

    List<SearchPlugin> getSearchPlugins(GetSearchPluginsParam param);

    void installSearchPlugins(InstallSearchPluginsParam param);

    void uninstallSearchPlugins(UninstallSearchPluginsParam param);

    void enableSearchPlugins(EnableSearchPluginsParam param);

    void updateSearchPlugins(UpdateSearchPluginsParam param);
}
